<?php defined('InNcPHP') or exit('Access Invalid!');?>

<script type="text/javascript" src="<?php echo RESOURCE_URL;?>/common/jquery-ui/jquery.ui.js"></script>
<script type="text/javascript" src="<?php echo RESOURCE_URL;?>/common/jquery-ui/i18n/zh-CN.js" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" href="<?php echo RESOURCE_URL;?>/common/jquery-ui/themes/ui-lightness/jquery.ui.css"  />
<script type="text/javascript" src="<?php echo RESOURCE_URL;?>/common/jquery-ui-timepicker-addon/jquery-ui-timepicker-addon.min.js"></script>
<link rel="stylesheet"  type="text/css" href="<?php echo RESOURCE_URL;?>/common/jquery-ui-timepicker-addon/jquery-ui-timepicker-addon.min.css">

<style>
    .date{}
</style>
<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <h3><?php echo $lang['order_index'];?></h3>
            <?php echo $output['top_link'];?>
        </div>
    </div>
    <div class="fixed-empty"></div>
    <!--  搜索表单  -->
    <form method="get" name="formSearch" id="formSearch">
        <input type="hidden" value="bargain_paid" name="act">
        <input type="hidden" value="index" name="op">
        <table class="tb-type1 noborder search">
            <tbody>
            <tr>
                <th><label> <?php echo $lang['order_sn'];?></label></th>
                <td><input type="text" name="search_sn" value="<?php echo $output['search']['search_sn']; ?>" class="txt"></td>
                <th><label><?php echo $lang['paid_time'];?></label></th>
                <td><input type="text" name="search_stime" value="<?php echo $output['search']['search_stime']; ?>" id="search_stime" class="txt date" style="width:110px;"></td>
                <td><input type="text" name="search_etime" value="<?php echo $output['search']['search_etime']; ?>" id="search_etime" class="txt date" style="width:110px;"></td>
                <td>
                    <a href="javascript:void(0);" onclick="$('#formSearch').submit();" class="btn-search"></a>
                    <?php if ($output['search']['search_sn'] || $output['search']['search_stime'] || $output['search']['search_etime'] || $output['search']['search_merchant'] || $output['search']['search_status']): ?>
                        <a href="index.php?act=bargain_paid&op=index" class="btns "><span><?php echo $lang['nc_cancel_search']?></span></a>
                    <?php endif; ?>
                </td>
            </tr>

            </tbody>
        </table>
    </form>

    <div style="text-align:right;"><a class="btns" target="_blank" href="index.php?<?php echo $_SERVER['QUERY_STRING'];?>&op=export"><span><?php echo $lang['nc_export'];?>Excel</span></a></div>
    <!--  显示列表  -->
    <table class="table tb-type2 nobdb">
        <thead>
        <tr class="thead">

            <th class="align-center"><?php echo $lang['order_sn']?></th>
            <th class="align-center"><?php echo $lang['member_name']?></th>
            <th class="align-center"><?php echo $lang['paid_money']?></th>
            <th class="align-center"><?php echo $lang['paid_time']; ?></th>


        </tr>
        <tbody>
        <?php if(!empty($output['bargain_paid']) && is_array($output['bargain_paid'])){ ?>
            <?php foreach($output['bargain_paid'] as $k => $v){ ?>
                <tr class="hover member">

                    <td class="align-center"><?php echo $v['bg_order_sn']; ?></td>
                    <td class="align-center"><?php echo $v['nickname']; ?></td>
                    <td class="align-center"><?php echo $v['paid_size']; ?></td>
                    <td class="align-center"><?php echo date('Y-m-d H:i:s',$v['add_time']); ?></td>


                </tr>
            <?php } ?>
        <?php }else { ?>
            <tr class="no_data">
                <td colspan="11"><?php echo $lang['nc_no_record']?></td>
            </tr>
        <?php } ?>
        </tbody>
        <tfoot class="tfoot">
        <?php if(!empty($output['bargain_paid']) && is_array($output['bargain_paid'])){ ?>
            <tr>
                <td colspan="16">
                    <div class="pagination"> <?php echo $output['page'];?> </div>
                </td>
            </tr>
        <?php } ?>
        </tfoot>
    </table>
</div>

<script>
    $('#search_stime').datetimepicker({
        controlType: 'select'
    });

    $('#search_etime').datetimepicker({
        controlType: 'select'
    });
    </script>
